MAKE MEMBLOCK FROM BITMAP

This command will make a memblock from a bitmap.

  Syntax
MAKE MEMBLOCK FROM BITMAP Memblock Number, Bitmap Number
  Parameters
Memblock Number
Integer
The memblock number
Bitmap Number
Integer
The bitmap number

  Returns

This command does not return a value.

  Description

The specified values must be integer values and the source resource must exist or the command will fail. The memblock stores the data as Width(DWORD), Height(DWORD), Depth(DWORD), Data(BYTES).

  Example Code
load bitmap "face.bmp",BitmapNumber
MAKE MEMBLOCK FROM BITMAP MemblockNumber, BitmapNumber
MAKE BITMAP FROM MEMBLOCK BitmapNumber, MemblockNumber
rem Display data
cls
print "MEMBLOCK EXPRESSION DATA"
print
if MEMBLOCK EXIST(MemblockNumber)=1
print "memblock:";MemblockNumber
print "exist:";MEMBLOCK EXIST(MemblockNumber)
print "ptr:";GET MEMBLOCK PTR(MemblockNumber)
print "size:";GET MEMBLOCK SIZE(MemblockNumber)
endif
rem Delete memblocks
if MEMBLOCK EXIST(MemblockNumber)=1 then DELETE MEMBLOCK MemblockNumber
do
loop
end
  See also

MEMBLOCKS Commands Menu
Index